<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增设备管理')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-devices-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备名称：</label>
                <div class="col-sm-8">
                    <input name="deviceName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">设备位置：</label>
                <div class="col-sm-8">
                    <!-- <input name="devicePosition" class="form-control" type="text"> -->
                    <select class="form-control"
                        name="devicePosition"
                        data-ajax--url="/system/positions/select2"
                        data-placeholder="请选择位置">
					</select>
                    <!-- <select class="form-control" name="devicePosition" >
                    	<option value="">--请选择开发语言--</option>
                    	<option value="1">Java</option>
                    	<option value="2">PHP</option>
                    	<option value="3">.NET</option>
                    </select> -->
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/devices"
        $("#form-devices-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-devices-add').serialize());
            }
        }
    </script>
</body>
</html>